package com.xopencode.atomic;

import java.util.Queue;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicStampedReference;

/**
 * @author Mcb
 * @date 2022/9/4
 * @apiNote 原子类实现
 */
public class Demo01 {
    public static void main(String[] args) {
        AtomicInteger atomicInteger = new AtomicInteger(10);
        System.out.println(atomicInteger.getAndSet(12));
        System.out.println(atomicInteger.get());

    }
}
